package net.whg.java.abstrac;

public class RightTriangle extends Triangle{

    public RightTriangle(double a, double b) {
        super(a, b, Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)));
    }

    @Override
    public void calculateArea() {
        area = 0.5 * a * b;
    }
}
